<script type="text/javascript" >
    stFacebookToolbox.load_tooltip();
    stFacebookToolbox.on_submitform('#stFacebookToolboxForm', function(data){
        stFacebookToolbox.loadPage('facebook_pages', '', '<?php _e("Successful", $config['plugin_name']) ?>');
    });
    stFacebookToolbox.loadUploadButton('200');
    stFacebookToolbox.loadRemoveButton();
</script>
<div class="w100p bgl">
    <div class="w100p bgr p5b">
        <form class="stform" id="stFacebookToolboxForm" action="<?php echo admin_url('/admin.php?page=' . $config['plugin_name'] . '&action=' . $current_action) ?>" method="post" >
            <ul>
                <li>
                    <label><?php _e('Page id', $config['plugin_name']); ?>:</label>
                    <div class="required">
                        <input value="<?php echo $id;?>" class="required" name="data[pageid]" id="pageid" type="text" style="width: 200px" />&nbsp;<input type="button" value="Submit" style="margin-left:0px;color:#FFF;" onclick="stFacebookToolbox.loadPage('add_facebook_page&id='+jQuery('#pageid').val());" class="button_submit" />
                        <input type="hidden" name="data[user_id]" value="<?php echo $user_id;?>" />
                    </div>
                    <br clear="both" />
                </li>
                <?php if(isset($pageid))
                {?>
                <li>
                    <label><?php _e('Page name', $config['plugin_name']); ?>:</label>
                        <input class="" name="data[pagename]" id="pagename" type="hidden" value="<?php echo $pageid->name;?>" />
					<span style="float: left;padding: 7px 0 0 6px;width: 200px;"><?php echo $pageid->name;?></span>                   
                    <br clear="both" />
                </li>
                <li>
                    <label><?php _e('Page picture', $config['plugin_name']); ?>:</label>
                    <span style="float: left;padding: 7px 0 0 6px;width: 200px;"><img src="<?php echo $pageid->picture;?>" /></span>
                    <input class="" name="data[pagepictureurl]" id="pagepictureurl" type="hidden" value="<?php echo $pageid->picture;?>" />
                    <br clear="both" />
                </li>
                <li>
                    <label><?php _e('Page url', $config['plugin_name']); ?>:</label>
                    <input class="" name="data[pageurl]" id="pageurl" type="hidden" value="<?php echo $pageid->link;?>" />
					<span style="float: left;padding: 7px 0 0 6px;width: 200px;"><?php echo $pageid->link;?></span>
                    <br clear="both" />
                </li>
                <li>
                    <label><?php _e('Fan count', $config['plugin_name']); ?>:</label>
                        <input class="" name="data[fancount]" id="fan_count" type="hidden" value="<?php echo $pageid->likes;?>" />
                        <span style="float: left;padding: 7px 0 0 6px;width: 200px;"><?php echo $pageid->likes;?></span>
                 <br clear="both" />
                </li>
                <li>
                    <input type="submit" value="Save"/>
                </li>
                <?php } ?>
          
            </ul>
           
        </form>
    </div>
</div>